package com.hnhcyy.goods.pojo;


import java.util.List;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.hnhcyy.goods.properties.ImageConfig;

/**
 * 首页轮播图
 */
public class Banner {
	
	/**
	 * 自动编号,主键
	 */
	@JsonInclude(Include.NON_NULL)
	private Integer fid;
	/**
	 * 商家ID
	 */
	@JsonInclude(Include.NON_NULL)
	private Integer sjid;
	/**
	 * 图片文件名
	 */
	@JsonIgnore
	private String jpgfile;
	/**
	 * 链接地址
	 */
	@JsonInclude(Include.NON_NULL)
	private String url;
	/**
	 * 是否显示
	 */
	@JsonInclude(Include.NON_NULL)
	private Integer fvisible;
	/**
	 * 设备类型:web表示PC端,mobile表示手机端
	 */
	@JsonIgnore
	private String devicetype;
	/**
	 * 显示顺序
	 */
	@JsonInclude(Include.NON_NULL)
	private Integer findex;
	/**
	 * 关联banner图商品表
	 */
	@JsonInclude(Include.NON_NULL)
	private List<BannerSp> bannerSpList;
	
	/**
	 * 图片url
	 * @author sheyongjun
	 * @date 2019年1月19日
	 */
	public String getImage() {
		return ImageConfig.bannerPicturePrefix + devicetype + "/" + jpgfile;
	}
	
	public Integer getFid() {
		return fid;
	}
	public void setFid(Integer fid) {
		this.fid = fid;
	}
	public Integer getSjid() {
		return sjid;
	}
	public void setSjid(Integer sjid) {
		this.sjid = sjid;
	}
	public String getJpgfile() {
		return jpgfile;
	}
	public void setJpgfile(String jpgfile) {
		this.jpgfile = jpgfile;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public Integer getFvisible() {
		return fvisible;
	}
	public void setFvisible(Integer fvisible) {
		this.fvisible = fvisible;
	}
	public String getDevicetype() {
		return devicetype;
	}
	public void setDevicetype(String devicetype) {
		this.devicetype = devicetype;
	}
	public Integer getFindex() {
		return findex;
	}
	public void setFindex(Integer findex) {
		this.findex = findex;
	}
	public List<BannerSp> getBannerSpList() {
		return bannerSpList;
	}
	public void setBannerSpList(List<BannerSp> bannerSpList) {
		this.bannerSpList = bannerSpList;
	}
}
